package com.lock.lock_common.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper=false)
public class Result<T> implements Serializable {

    /**
     * 状态信息
     */
    private String msg;
    /**
     * 传输的数据
     */
    private T data;
    /**
     * 传输数据是否成功
     */
    private boolean flag;

    public Result() {
    }

    public Result(boolean flag, String msg, T data) {
        this.msg = msg;
        this.data = data;
        this.flag = flag;
    }

    public Result(boolean flag, String msg) {
        this.msg = msg;
        this.flag = flag;
    }

}
